package org.xm.sk.vo.ob;

import java.util.List;
import java.util.Map;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value = "MapList", description = "列表信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MapList<T> {
    
    @ApiModelProperty(value = "列表记录总数")
    Long total;
    
    @ApiModelProperty(value = "列表")
    List<T> rows;
    
    @ApiModelProperty(value = "扩展数据")
    Map<String, ?> mapData;
    
    public MapList(Long tolal, List<T> rows) {
        this.total = tolal;
        this.rows = rows;
    }
    
    public <K> void setMapData(Map<String, K> mapData) {
        this.mapData = mapData;
    }
    
    public Map<String, ?> getMapData() {
        return this.mapData;
    }
}
